﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Nonocast.Scheduling {
	public interface TaskRule {
		string Type { get; }
		bool Enable { get; set; }
		int Priority { get; set; }
		bool IsAudited { get; set; }
		TaskRule<T> Cast<T>();

		DateTime StartTime { get; set; }
		DateTime? ExpirationTime { get; set; }
	}

	public interface Once : TaskRule {
		DateTime SpecificDate { get; set; }
	}

	public interface DaysOfWeek : TaskRule {
		WeekMask WeekMask { get; set; }
	}

	public interface TaskRule<T> : TaskRule {
		T Context { get; set; }
		Task<T> Generate(Task<T> reference = null);
	}
}
